<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('来电记详情')"/>
    <link th:href="@{/ajax/libs/bootstrap-tagsinput/tagsinput.css}" rel="stylesheet">
    <link th:href="@{/ajax/libs/jQuery-ui/jquery-ui.css}" rel="stylesheet">
    <link rel="stylesheet" type="text/css" th:href="@{/ajax/libs/qxEasyUI/themes/default/easyui.css}">

</head>


<body style="background-color: #F4F6FA">
<div class="main-content" style="margin: 0;padding: 0">

    <form id="form-user-add" class="form-horizontal" th:object="${telGetDeal}" style="background-color: #F4F6FA">
        <input name="pkId" th:value="*{pkId}" type="hidden">
        <input name="liftWorkNo" th:value="*{liftWorkNo}" type="hidden">
        <input name="liftWorker" th:value="*{liftWorker}" type="hidden">
        <input name="liftTelNo" th:value="*{liftTelNo}" type="hidden">
        <input name="callId" th:value="*{callId}" type="hidden">
        <input name="tapeId" th:value="*{tapeId}" type="hidden">
        <input name="reenterState" id="reenterState" type="hidden">

        <div class="col-sm-12" style="display: flex">
            <!--     左       -->
            <div class="col-sm-6 entering-page">
                <!--    历史来电    -->
                <div class="col-sm-12 entering-top">
                    <div>历史来电数:<strong>[[${history}]]</strong></div>
                    <div>不满意:<strong>[[${noLike}]]</strong></div>
                    <div>常涉问题:<strong>[[${problem}]]</strong></div>
                </div>
                <!--事发地址-->
                <div class="col-sm-12 entering-mt">
                    <div class="form-group">
                        <label class="col-sm-2 control-label is-required entering-pd">事发地址：</label>
                        <div class="col-sm-8">
                            <input name="fmAddress" placeholder="请输入" class="form-control scene theAddress" type="text"
                                   maxlength="30" th:value="*{fmAddress}"
                                   required="">
                        </div>
                        <div class="col-sm-2">
                            <input id="sensitiveId" type="hidden" name="sensitiveId"
                                   th:value="${sensitive == null ? '':sensitive.id}"/>
                            <button type="button" class="btn btn-sm btn-primary"
                                    style="margin-top: 3px;color: #206ef7;background-color: white"
                                    onclick="sensitivity()">敏感信息
                            </button>
                        </div>
                    </div>
                </div>
                <!--来电类容-->
                <div class="col-sm-12">
                    <div class="form-group">
                        <label class="col-xs-2 control-label entering-pd">来电内容：</label>
                        <div class="col-xs-10">
                            <textarea name="fmContent" maxlength="1000" class="form-control phoneRemark" rows="3"
                                      style="height: 100px">[[${telGetDeal.fmContent}]]</textarea>

                            <span>还可以输入<i class="phoneRemarkI">1000</i>个文字</span>
                            <!-- <button type="button" class="btn btn-sm btn-primary" style="position: absolute;right: 15px"
                                     onclick="identification()">历史记录
                             </button>-->

                        </div>
                    </div>
                </div>
                <!--来电人名等，关键词等，分两个部分-->
                <!--来电人名等-->
                <div class="col-sm-6">
                    <div class="col-sm-12">
                        <div class="form-group">
                            <label class="col-sm-4 control-label is-required entering-pd">来电人名：</label>
                            <div class="col-sm-8">
                                <input name="fromName" placeholder="请输入" class="form-control phoneName" type="text"
                                       maxlength="5" required="" th:value="*{fromName}">
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-12">
                        <div class="form-group">
                            <label class="col-sm-4 control-label entering-pd">联系电话：</label>
                            <div class="col-sm-8">
                                <input name="fromTelA" placeholder="请输入" class="form-control relationPhone" type="text"
                                       maxlength="11" required="" th:field="*{fromTelA}">
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-12">
                        <div class="form-group">
                            <label class="col-sm-4 control-label is-required entering-pd">来电类别：</label>
                            <div class="col-sm-8">
                                <select name="dfmClaNo" id="dfmClaNo" required
                                        th:with="telTypes=${@commonServiceImpl.findTelType()}"
                                        onchange="dropChgSendTextOnly(this,'dfmClaName');"
                                        class="form-control formSelect" th:field="*{dfmClaNo}">
                                    <option value="">--请选择--</option>
                                    <th:block th:each="item : ${telTypes}">
                                        <option th:text="${item['CSText']}" th:value="${item['CSValue']}"></option>
                                    </th:block>
                                </select>
                                <input type="hidden" name="dfmClaName" id="dfmClaName" th:value="*{dfmClaName}"/>
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-12">
                        <div class="form-group">
                            <label class="col-sm-4 control-label is-required entering-pd">内容类别：</label>
                            <div class="col-sm-8">
                                <input id="qxCT" style="width:152px;height:31px;" th:value="*{dcntAname}">
                                <input id="txtDcntAcode" name="dcntAcode" type="hidden" th:value="*{dcntAcode}"/>
                                <input id="txtDCntAName" name="dcntAname" type="hidden" th:value="*{dcntAname}"/>
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-12">
                        <div class="form-group">
                            <label class="col-sm-4 control-label entering-pd">被诉主体：</label>
                            <div class="col-sm-8">
                                <input name="accSubject" placeholder="请输入" class="form-control" type="text"
                                       maxlength="30"  id="subject" th:value="*{accSubject}">
                            </div>
                        </div>
                    </div>

                </div>


                <!--bootstrap关键词等-->
                <div class="col-sm-6">
                    <div>关键词标签</div>
                </div>
                <div class="col-sm-6">
                    <input class="antistop" name="keyWord" th:value="*{keyWord}" type="text" value=""
                           data-role="tagsinput">
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-xs-4 control-label">屏蔽号码：</label>
                        <div class="col-xs-8">
                            <label class="check-box">
                                <input name="hideTel" type="radio" value="5" th:checked="${telGetDeal.hideTel == 5}">是
                            </label>
                            <label class="check-box">
                                <input name="hideTel" type="radio" value="0" th:checked="${telGetDeal.hideTel ne 5}">否
                            </label>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-xs-4 control-label">同意公开：</label>
                        <div class="col-xs-8">
                            <label class="check-box">
                                <input name="openFrom" type="radio" value="1" th:checked="${telGetDeal.openFrom == 1}">是
                            </label>
                            <label class="check-box">
                                <input name="openFrom" type="radio" value="0" th:checked="${telGetDeal.openFrom == 0}">否
                            </label>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-xs-4 control-label">重复来电：</label>
                        <div class="col-xs-8">
                            <label class="check-box">
                                <input name="repeatFlag" type="radio" value="1"
                                       th:checked="${telGetDeal.repeatFlag == 1}">是
                            </label>
                            <label class="check-box">
                                <input name="repeatFlag" type="radio" value="0"
                                       th:checked="${telGetDeal.repeatFlag == 0}">否
                            </label>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-xs-4 control-label">紧急联系：</label>
                        <div class="col-xs-8">
                            <label class="check-box">
                                <input name="mark" type="radio" value="1" th:checked="${telGetDeal.mark == 1}">是
                            </label>
                            <label class="check-box">
                                <input name="mark" type="radio" value="0" th:checked="${telGetDeal.mark == 0}">否
                            </label>
                        </div>
                    </div>
                </div>
                <div class="col-sm-12 col-sm-offset-2 entering-bt">
                    <button type="button" class="btn btn-sm btn-warning"
                            onclick="draft('存草稿','101')">存草稿
                    </button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <button type="button" class="btn btn-sm btn-primary"
                            onclick="draft('转值班长处理','120')">转值班长
                    </button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <button type="button" class="btn btn-sm btn-info"
                            onclick="draft('坐席当场解答','131')">当场解答
                    </button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <button type="button" class="btn btn-sm btn-success"
                            onclick="draft('无效来电 当场作废','132')">无效来电
                    </button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <input id="tbStateDesc" name="stateDesc" value="草稿" type="hidden"/>
                    <input id="stateFlag" name="stateFlag" value="101" type="hidden"/>
                    <button type="button" class="btn btn-sm btn-warning" onclick="$.modal.closeTab()">关闭</button>&nbsp;
                </div>
            </div>

            <!--     右       -->
            <div class="col-sm-6 entering-page">
                <div class="col-sm-12 tltieBoder">
                    <div class="blueBorder"></div>
                    <h4 style="margin:0 0 0 10px">坐席处理情况</h4>
                </div>
                <div class="col-sm-12">
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label class="col-sm-4 control-label is-required entering-pd">接听人：</label>
                            <div class="col-sm-8">
                                <input name="liftWorker" placeholder="请输入" class="form-control answer" type="text"
                                       disabled="disabled" required="" th:field="*{liftWorker}">
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label class="col-sm-4 control-label is-required entering-pd">接通时间：</label>
                            <div class="col-sm-8">
                                <input name="fromTime" placeholder="请输入" class="form-control answerTime" type="text"
                                       disabled="disabled" required="" th:field="*{fromTime}">
                            </div>
                        </div>
                    </div>
                    <!-- <div class="col-sm-6">
                         <div class="form-group">
                             <label class="col-sm-4 control-label entering-pd">处理结果：</label>
                             <div class="col-sm-8">
                                 <input name="result" placeholder="请输入" class="form-control result" type="text"
                                        maxlength="5" required="">
                             </div>
                         </div>
                     </div>-->
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label class="col-sm-4 control-label is-required entering-pd">挂断时间：</label>
                            <div class="col-sm-8">
                                <input name="liftEnd" placeholder="请输入" class="form-control hangUpTime" type="text"
                                       disabled="disabled" required="" th:field="*{liftEnd}">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-12">
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label class="col-xs-4 control-label entering-pd">坐席备注：</label>
                            <div class="col-xs-8">
                                <textarea disabled="disabled" name="SeatsRemark" maxlength="3500"
                                          class="form-control SeatsRemark"
                                          rows="3" style="height: 150px">[[${telGetDeal.xsysDesc}]]</textarea>
                                <span>还可以输入<i class="SeatsRemarkI">3500</i>个文字</span>
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label class="col-xs-4 control-label entering-pd">交办意见：</label>
                            <div class="col-xs-8">
                                <textarea disabled="disabled" name="opinion" maxlength="3500"
                                          class="form-control opinion"
                                          rows="3" style="height: 150px">[[${telGetDeal.xdealDesc}]]</textarea>
                                <span>还可以输入<i class="opinionI">3500</i>个文字</span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-12 tltieBoder">
                    <div class="blueBorder"></div>
                    <h4 style="margin:0 0 0 10px">值班长处理情况</h4>
                </div>
                <div class="col-sm-12">
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label class="col-sm-4 control-label entering-pd">处理结果：</label>
                            <div class="col-sm-8">
                                <input disabled="disabled" name="stateDesc" placeholder="请输入"
                                       class="form-control phoneName" type="text"
                                       th:field="*{stateDesc}">
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label class="col-sm-4 control-label entering-pd">备注：</label>
                            <div class="col-sm-8">
                                <input disabled="disabled" name="ysysDesc" placeholder="请输入"
                                       class="form-control phoneName" type="text"
                                       th:field="*{ysysDesc}">
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label class="col-sm-4 control-label entering-pd">处理意见：</label>
                            <div class="col-sm-8">
                                <input disabled="disabled" name="ydealDesc" placeholder="请输入"
                                       class="form-control phoneName" type="text"
                                       th:field="*{ydealDesc}">
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label class="col-sm-4 control-label entering-pd">处理时间：</label>
                            <div class="col-sm-8">
                                <input disabled="disabled" name="yeditTime" placeholder="请输入"
                                       class="form-control disposeTime" type="text"
                                       th:field="*{yeditTime}">
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label class="col-sm-4 control-label entering-pd">处理人：</label>
                            <div class="col-sm-8">
                                <label class="form-control-static" th:text="${operator}"></label>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-12"
                     style="margin-bottom: 10px;display: flex;justify-content: flex-end;flex-direction: row;">
                    &nbsp;&nbsp;&nbsp;
                    <button type="button" class="btn btn-sm btn-warning" onclick="$.modal.closeTab()">关闭
                    </button>&nbsp;
                </div>
            </div>
        </div>

    </form>


</div>

<script th:src="@{/ajax/libs/layui/laydate.js}"></script>
<th:block th:include="include :: footer"/>
<script th:src="@{/ajax/libs/bootstrap-tagsinput/tagsinput.min.js}"></script>
<script th:src="@{/ajax/libs/jQuery-ui/jquery-ui.js}"></script>
<script th:src="@{/ajax/libs/qxEasyUI/jquery.easyui.min.js}"></script>
<script th:src="@{/js/teladd.js}"></script>
<script th:src="@{/js/teldetail.js}"></script>
<script>
    // 选择内容分类
    $('#qxCT').combotree({
        url: '/system/common/findContentCate',
        required: false,
        onSelect: function (record) {
            $("#txtDcntAcode").val(record.id);
            $("#txtDCntAName").val(record.text);
        }
    });
    var sensitiveInfo = new Object()

    function GetChildValue(data) {
        sensitiveInfo.cardId = data[0].value;
        sensitiveInfo.militaryId = data[1].value;
        sensitiveInfo.realName = data[2].value;
        sensitiveInfo.medicalCardNum = data[3].value;
        sensitiveInfo.other = data[4].value;
        console.log(sensitiveInfo)
    }

    //    存草稿
    function draft(fpStr, str) {
        $("#tbStateDesc").val(fpStr);
        $('#stateFlag').val(str);
        if (str == '120') {
            $('#reenterState').val(1)
        }
        if ($.validate.form()) {
            let data = $('#form-user-add').serializeArray();
            if (!$.isEmptyObject(site)) {
                data.push({name: "uid", value: site.uid});
                data.push({name: "name", value: site.name});
                data.push({name: "address", value: site.address});
                data.push({name: "alias", value: site.alias});
                data.push({name: "tag", value: site.tag});
                data.push({name: "province", value: site.province});
                data.push({name: "city", value: site.city});
                data.push({name: "district", value: site.district});
                data.push({name: "telephone", value: site.telephone});
                data.push({name: "locationx", value: site.location.x});
                data.push({name: "locationy", value: site.location.y});
                data.push({name: "distance", value: site.distance});
                data.push({name: "brandName", value: site.brandName});
                data.push({name: "aoiName", value: site.aoiName});
                data.push({name: "storeComment", value: site.storeComment});
                data.push({name: "storePeriod", value: site.storePeriod});
                data.push({name: "faceId", value: site.faceId});
                data.push({name: "bid", value: site.bid});
            }
            if (!$.isEmptyObject(sensitiveInfo)) {
                data.push({name: "cardId", value: sensitiveInfo.cardId});
                data.push({name: "militaryId", value: sensitiveInfo.militaryId});
                data.push({name: "realName", value: sensitiveInfo.realName});
                data.push({name: "medicalCardNum", value: sensitiveInfo.medicalCardNum});
                data.push({name: "other", value: sensitiveInfo.other});
            }
            var prefix = ctx + "system/mTelRcd";
            $.operate.saveTab(prefix + "/edit", data);
        }

    }
</script>
</body>
</html>

